/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cl.darksigns.webstat.client;

import java.util.HashMap;
import java.util.ResourceBundle;

/**
 *
 * @author _ViKtOr
 */
public class ClientResource {
    
    HashMap hash;
    ResourceBundle resource;
    static ClientResource _instance;
    
    /**
     * 
     * @return
     */
    public static ClientResource getInstance(){
        
        if(_instance == null){
            _instance = new ClientResource();
        }
        return _instance;
    }
    /**
     * 
     */
    private ClientResource(){
        resource = ResourceBundle.getBundle("wst_client");
        hash = new HashMap();
        hash.put("APP_ID", resource.getString("APP_ID"));
        hash.put("COMMUNICATION", resource.getString("COMMUNICATION"));
        hash.put("RMI_JNDI", resource.getString("RMI_JNDI"));
        hash.put("RMI_PROVIDER_URL", resource.getString("RMI_PROVIDER_URL"));
        hash.put("RMI_NAME_SERVICE", resource.getString("RMI_NAME_SERVICE"));
    }
    /**
     * 
     * @param key
     * @return
     */
    public String getResource(String key){
        return (String) hash.get(key);
    }

}
